<?
    
    require_once( CLASS_REQUIRE_INDEX );
    require_once( CLASS_REQUIRE_MODEL );
    require_once( CLASS_FUNCTIONS );    
    require_once( CLASS_EMAIL );    
    require_once( MODEL_DIR . "AgendaModel.class.php" );
    

    class AgendaController extends IndexController {

            function __construct(){
                parent::__construct();
                  
               $this->model = new AgendaModel();
            }

            public function defaultAction()
            {
                
               $Agenda = $this->model->get_agenda_shows();
               
                 #passa a variavel do controller($Agenda)para a variavel do html#
                parent::setAttribute('agenda',$Agenda);
                
                parent::setAttribute("lateral","main_lateral.html");
                parent::setAttribute("view","main_agenda_shows.html");
                parent::execute("main_index.html");
                
              
                 
            } 
                
            public function Shows()
            { 

               #passa a variavel do array com os valores#  
               $config['date'] = "%A, %e de %B, %Y";
                parent::setAttribute("config",$config);
               $agenda = $this->model->ListaAgendaShows();
                                   

                
                parent::setAttribute("lateral","main_lateral.html");
                parent::setAttribute("view","main_agenda_shows.html");
                parent::execute("main_index.html");
                
            }
          
            
        }    
?>